package jsyf.oa.entity.wreport;

import com.alibaba.fastjson.JSONObject;
import jsyf.oa.ientity.BaseEntity;

import javax.persistence.Entity;
import javax.persistence.Table;
import java.io.Serializable;

/**
 * Created by Lenovo on 2017/11/24.
 */
@Entity
@Table(name = "T_WRT_TEMPLATE_2_MODULE", schema = "oa", catalog = "")
public class Template2ModuleEntity extends BaseEntity  implements Serializable {
    private String templateId;
    private String moduleId;

    public String getTemplateId() {
        return templateId;
    }

    public void setTemplateId(String templateId) {
        this.templateId = templateId;
    }

    public String getModuleId() {
        return moduleId;
    }

    public void setModuleId(String moduleId) {
        this.moduleId = moduleId;
    }

    public JSONObject getJSONObject(){
        JSONObject obj = new JSONObject();
        obj.put("ID", this.getId());
        obj.put("TEMPLATE_ID", this.getTemplateId());
        obj.put("MODULE_ID", this.getModuleId());

        return obj;
    }

    @Override
    public String getTableName() {
        return "T_WRT_TEMPLATE_2_MODULE";
    }

    @Override
    public JSONObject getJSONColumns() {
        JSONObject obj = new JSONObject();
        obj.put("ID", "id");
        obj.put("TEMPLATE_ID", "templateId");
        obj.put("MODULE_ID", "moduleId");

        return obj;
    }
}
